const mongoose = require('./../db')
const Schema = mongoose.Schema

const schema = new Schema({
  stuid: { type: String, required: false },
  class: { type: String, required: false },
  stunum: { type: Number, require: false },
  stuname: { type: String, required: false },
  password: { type: String, required: false },
  sex: { type: Number, required: false },
  avatar: { type: String, required: false }, // 头像
  regtime: { type: Date, required: false, default: Date.now },
  flag: { type: Number, required: false, default: 1 }, // 账号是否被冻结 1 正常使用 0 冻结
})

module.exports = mongoose.model('Student', schema)
